#ifndef GIGECCDINTF_H
#define GIGECCDINTF_H

#include "Windows.h"
#include "MVC_Common.h"
#include <QString>

typedef DWORD (WINAPI *T_MVC_CloseDevice)(DWORD CardNo);
typedef DWORD (WINAPI *T_MVC_ReScanDevice)();
typedef DWORD (WINAPI *T_MVC_GetDeviceNumber)();
typedef DWORD (WINAPI *T_MVC_GetDeviceInfoEx)(DWORD CardNo,MVCGE_DEVLISTEX *DevList);
typedef DWORD (WINAPI *T_MVC_AutoIPConfig)(DWORD CardNo);
typedef DWORD (WINAPI *T_MVC_OpenDevice)(DWORD CardNo);
typedef DWORD (WINAPI *T_MVC_SetParameter)(DWORD CardNo,MVC_PARAMTER Oper,DWORD Val );
typedef DWORD (WINAPI *T_MVC_EnableCapture)(DWORD CardNo);
typedef DWORD (WINAPI *T_MVC_SetStreamHOOK)(DWORD CardNo,StreamProc lpStreamFun,PVOID pUserData);
typedef DWORD (WINAPI *T_MVC_SetDevLostHOOK)(DWORD CardNo,DevLostProc lpLostFun,PVOID pUserData);
typedef DWORD (WINAPI *T_MVC_DisableCapture)(DWORD CardNo);

class GigeCcdIntf
{
public:
    GigeCcdIntf(const QString &gigeLib);

    bool isNormal() const { return err.isEmpty(); }
    QString errorString() const { return err; }

    T_MVC_CloseDevice MVC_CloseDevice;
    T_MVC_ReScanDevice MVC_ReScanDevice;
    T_MVC_GetDeviceNumber MVC_GetDeviceNumber;
    T_MVC_GetDeviceInfoEx MVC_GetDeviceInfoEx;
    T_MVC_AutoIPConfig MVC_AutoIPConfig;
    T_MVC_OpenDevice MVC_OpenDevice;
    T_MVC_SetParameter MVC_SetParameter;
    T_MVC_EnableCapture MVC_EnableCapture;
    T_MVC_SetStreamHOOK MVC_SetStreamHOOK;
    T_MVC_SetDevLostHOOK MVC_SetDevLostHOOK;
    T_MVC_DisableCapture MVC_DisableCapture;

private:
    QString err;
};

#endif // GIGECCDINTF_H
